﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Common
{
    public class dgSetView
    {
        public static void SetFormatDataGridView(DataGridView dg)
        {
            dg.RowHeadersVisible = false;
            dg.ReadOnly = true;
            dg.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            //dg.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            //dg.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dg.RowHeadersVisible = false;
            dg.AllowUserToAddRows = false;
            dg.AllowUserToDeleteRows = false;
            dg.AllowUserToOrderColumns = true;
            dg.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }
    }
}
